/**
 * Creates a SVG canvas element to host the shapes
 * @class SvgCanvas
 * @extends SvgContainer
 * @constructor
 * @param {object} config  See configuration attributes
 * @author Helge Andersen
 */
/**
 * A dom element to host the svg canvas, can be a div, document.body etc.
 * @config el 
 * @type DOMElement
 */
/**
 * A config object with the attributes the svg element
 * @config attr 
 * @type Object
 */
var SvgCanvas = {
    /**
     * Constructor
     * @method init
     * @private
     */
    init: function(config) {        
        this._super("svg", config.el);
        this.canvas = this.dom;
        this.attr({
            'version':'1.1', 
            width:'10cm', 
            height:'10cm'
        });
        if (config.attr) this.attr(config.attr);
    },
    
    /**
     * Creates a defines section in the SVG element
     * @method defines
     * @param {object} a Config object with attributes, read SVG specifications for valid attributes
     * @return {SvgDefines}
     */
    defines: function(a) {
        return new SvgDefines(this.dom, this.dom).attr(a ? a : {});
    }
};
SvgCanvas = SvgContainer.extend(SvgCanvas);